home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / boot / ShellUpdate.lha / Documentation / PushCD < prev    next >
Text File  |  2001-12-24  |  1KB  |  42 lines

  1. PushCD
  2.  
  3. Format:        PUSHCD [<dir>]
  4. Template:    DIR
  5. Purpose:    Change and remember the current directory
  6. Path:        Internal
  7. Specification:    PUSHCD places the current working directory onto the 
  8.     directory stack and, optionally, changes the current directory to
  9.     the specified target.
  10.  
  11. PUSHCD works very much like the CD command except that it remembers the
  12. current directory before it gets changes. This remembered directory can be
  13. retrieved later on by means of either POPCD or SWAPCD.
  14.  
  15. The shell maintains a so-called "directory stack" onto which PUSHCD stacks
  16. the directories; each "PUSHCD" enlarges this stack by one entry, adding it
  17. to the top of the stack. A "POPCD" command removes the top entry from this
  18. stack and makes it the current directory; it therefore retrieves the former
  19. stored directory.
  20.  
  21. Examples:
  22.  
  23. Assume that the current directory is "SYS:" and you change into "Tools"
  24. by means of PUSHCD:
  25.  
  26. 1.SYS:> pushcd Tools
  27.  
  28. afterwards, the current directory will be "SYS:Tools", and the top entry
  29. on the directory stack will be "SYS:";
  30.  
  31. 1.SYS:Tools> 
  32.  
  33. A subsequent POPCD will restore the former directory.
  34.  
  35. 1.SYS:Tools> popcd
  36.  
  37. will result in the SYS: directory as current directory again.
  38.  
  39. 1.SYS:> 
  40.  
  41. See also: POPCD, SWAPCD
  42.